<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
    <th:block th:include="include :: header('新增访客信息')"/>
    <th:block th:include="include :: datetimepicker-css"/>
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
    <form class="form-horizontal m" id="form-userInfo-add">
        <!--            <div class="form-group">    -->
        <!--                <label class="col-sm-3 control-label">微信返回用户的唯一标识：</label>-->
        <!--                <div class="col-sm-8">-->
        <!--                    <input name="openId" class="form-control" type="text">-->
        <!--                </div>-->
        <!--            </div>-->
        <div class="form-group">
            <label class="col-sm-3 control-label">姓名：</label>
            <div class="col-sm-8">
                <input name="name" class="form-control" type="text">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label is-required">性别：</label>
            <div class="col-sm-8">
                <!--                    <input name="gender" class="form-control" type="text" required>-->
                <select name="gender" th:with="type=${@dict.getType('sys_user_sex')}" class="form-control">
                    <option th:each="dict : ${type}" th:text="${dict.getDictLabel()}"
                            th:value="${dict.getDictValue()}"></option>
                </select>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">身份证号码：</label>
            <div class="col-sm-8">
                <input name="idNumber" class="form-control" type="text">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">手机号码：</label>
            <div class="col-sm-8">
                <input name="phone" class="form-control" type="text">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">现住址：</label>
            <div class="col-sm-8">
                <input name="presentAddress" class="form-control" type="text">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">省：</label>
            <div class="col-sm-8">
                <input name="province" class="form-control" type="text">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">市：</label>
            <div class="col-sm-8">
                <input name="city" class="form-control" type="text">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">区/县：</label>
            <div class="col-sm-8">
                <input name="district" class="form-control" type="text">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">访客类别：</label>
            <div class="col-sm-8">
                <input name="category" class="form-control" type="text">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">授权访问次数：</label>
            <div class="col-sm-8">
                <input name="authorizedDuration" class="form-control" type="text">
            </div>
        </div>
        <!--            <div class="form-group">    -->
        <!--                <label class="col-sm-3 control-label">创建人：</label>-->
        <!--                <div class="col-sm-8">-->
        <!--                    <input name="creator" class="form-control" type="text">-->
        <!--                </div>-->
        <!--            </div>-->
        <!--            <div class="form-group">    -->
        <!--                <label class="col-sm-3 control-label">修改人：</label>-->
        <!--                <div class="col-sm-8">-->
        <!--                    <input name="modifier" class="form-control" type="text">-->
        <!--                </div>-->
        <!--            </div>-->
        <div class="form-group">
            <label class="col-sm-3 control-label">登记时间：</label>
            <div class="col-sm-8">
                <div class="input-group date">
                    <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                    <input name="modifyTime" class="form-control" placeholder="yyyy-MM-dd" type="text">
                </div>
            </div>
        </div>
    </form>
</div>
<th:block th:include="include :: footer"/>
<th:block th:include="include :: datetimepicker-js"/>
<script type="text/javascript">
    var prefix = ctx + "personnel/userInfo"
    $("#form-userInfo-add").validate({
        focusCleanup: true
    });

    function submitHandler() {
        if ($.validate.form()) {
            $.operate.save(prefix + "/add", $('#form-userInfo-add').serialize());
        }
    }

    $("input[name='modifyTime']").datetimepicker({
        format: "yyyy-mm-dd",
        minView: "month",
        autoclose: true
    });
</script>
</body>
</html>